home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Mac Game Programming Gurus / TricksOfTheMacGameProgrammingGurus.iso / Information / CSMP Digest / volume 2 / csmp-v2-001.txt next >
Encoding:
Text File  |  1994-12-08  |  37.4 KB  |  957 lines  |  [TEXT/R*ch]

  1. C.S.M.P. Digest             Mon, 04 Jan 93       Volume 2 : Issue 1
  2.  
  3. Today's Topics:
  4.  
  5.     Accessing MPW 411 from THINK C
  6.     How to store file references/names ?
  7.     Deadman programming - how to reset?
  8.     calling MacTCP from ioCompletion routine
  9.     How can you discover which debugger is installed?
  10.     AppleEvents for Print server 3.0?
  11.     Fixing Apples serial drivers. How???
  12.  
  13.  
  14.  
  15. The Comp.Sys.Mac.Programmer Digest is moderated by Michael A. Kelly.
  16.  
  17. The digest is a collection of article threads from the internet newsgroup
  18. comp.sys.mac.programmer.  It is designed for people who read c.s.m.p. semi-
  19. regularly and want an archive of the discussions.  If you don't know what a
  20. newsgroup is, you probably don't have access to it.  Ask your systems
  21. administrator(s) for details.  If you don't have access to news, there is
  22. no way that I know of for you to post articles to the group.
  23.  
  24. Each issue of the digest contains one or more sets of articles (called
  25. threads), with each set corresponding to a 'discussion' of a particular
  26. subject.  The articles are not edited; all articles included in this digest
  27. are in their original posted form (as received by our news server at
  28. cs.uoregon.edu).  Article threads are not added to the digest until the last
  29. article added to the thread is at least one month old (this is to ensure that
  30. the thread is dead before adding it to the digest).  Article threads that
  31. consist of only one message are generally not included in the digest.
  32.  
  33. The entire digest is available for anonymous ftp from ftp.cs.uoregon.edu
  34. [128.223.8.8] in the directory /pub/mac/csmp-digest.  Be sure to read the
  35. file /pub/mac/csmp-digest/README before downloading any files.  The most
  36. recent issues are available from sumex-aim.stanford.edu [36.44.0.6] in the
  37. directory /info-mac/digest/csmp.  If you don't have ftp capability, the sumex
  38. archive has a mail server; send a message with the text '$MACarch help' (no
  39. quotes) to LISTSERV@ricevm1.rice.edu for more information.
  40.  
  41. The digest is also available via email.  Just send a note saying that you
  42. want to be on the digest mailing list to mkelly@cs.uoregon.edu, and you will
  43. automatically receive each new issue as it is created.  Sorry, back issues
  44. are not available through the mailing list.
  45.  
  46. Send administrative mail to mkelly@cs.uoregon.edu.
  47.  
  48.  
  49. -------------------------------------------------------
  50.  
  51. Organization: Stanford Linear Accelerator Center
  52. Date: Tuesday, 1 Dec 1992 19:07:26 PST
  53. From: Nobukazu Toge <TOGE@SLACVM.SLAC.STANFORD.EDU>
  54. Subject: Accessing MPW 411 from THINK C
  55.  
  56. This is a small QuicKeys sequence file to access MPW's 411
  57. facility from within THINK C using ToolServer.  You need to have
  58. QuicKeys + CEIAC running for this to work.
  59.  
  60. I am posting this, because (1) it may help someone who want to
  61. use MPW 411 rather than THINK Reference, and (2) if someone can
  62. point out how to speed it up that would be nice [the sequence,
  63. as is, is a bit slow... you'll see.]
  64.  
  65. - - Nobu Toge (n.toge@applelink.apple.com
  66.              76334.650@compuserve.com    <-- preferred
  67.              toge@slacvm.slac.stanford.edu)
  68.  
  69. (This file must be converted with BinHex 4.0)
  70.  
  71. ---------------------------
  72.  
  73. From: jerry@uni-paderborn.de (Gerald Siek)
  74. Subject: How to store file references/names ?
  75. Date: 15 Nov 92 12:31:44 GMT
  76. Organization: University of Paderborn, Germany
  77.  
  78. Hiya Wizards!
  79.  
  80. What is the best (easiest?) way to store file informations in a preferences
  81. file?   My application reads an initialization file on startup and I want
  82. to give the user the possibility to choose what file should be read.
  83. I've heard that I should NOT try to store entire file names.   Can I simply 
  84. bring up a file dialog and the store the file reference number?   Or does 
  85. this number change as files and directories change on the hard disk?
  86.  
  87. Any suggestions?
  88.  
  89. Thanks in advance!
  90.     Jerry
  91. - --
  92.   Gerald Siek  -  jerry@uni-paderborn.de  -  University of Paderborn, Germany
  93.  
  94. +++++++++++++++++++++++++++
  95.  
  96. From: leonardr@netcom.com (Leonard Rosenthol)
  97. Date: 15 Nov 92 17:29:19 GMT
  98. Organization: Netcom - Online Communication Services  (408 241-9760 guest)
  99.  
  100. In article <1e5fvgINN835@uni-paderborn.de> jerry@uni-paderborn.de writes:
  101. >What is the best (easiest?) way to store file informations in a preferences
  102. >file?   My application reads an initialization file on startup and I want
  103. >to give the user the possibility to choose what file should be read.
  104. >I've heard that I should NOT try to store entire file names.   Can I simply 
  105. >bring up a file dialog and the store the file reference number?   Or does 
  106. >this number change as files and directories change on the hard disk?
  107. >
  108.     If you are a System 7 only product, then the best way would be to
  109. create an alias to the file (via NewAlias) and then store the aliasHandle
  110. in your prefs file.  If not, or if you will be working on both 6 & 7, then
  111. you need to create a new data structure which will store a volume NAME (
  112. volume reference numbers (vRefNums) are not valid across boots), a directory
  113. ID (dirID) and a file name.  With that information you can get back to those
  114. files.
  115.  
  116. - -- 
  117. - -----------------------------------------------------------------------------
  118. Leonard Rosenthol            Internet:     leonardr@netcom.com
  119. Director of Advanced Technology        AppleLink:    MACgician
  120. Aladdin Systems, Inc.            GEnie:        MACgician
  121.  
  122. +++++++++++++++++++++++++++
  123.  
  124. From: mxmora@unix.SRI.COM (Matt Mora)
  125. Date: 16 Nov 92 23:24:16 GMT
  126. Organization: SRI International, Menlo Park, California
  127.  
  128. In article <1992Nov15.172919.10970@netcom.com> leonardr@netcom.com (Leonard Rosenthol) writes:
  129.  
  130. >    If you are a System 7 only product, then the best way would be to
  131. >create an alias to the file (via NewAlias) and then store the aliasHandle
  132. >in your prefs file.  If not, or if you will be working on both 6 & 7, then
  133. >you need to create a new data structure which will store a volume NAME (
  134. >volume reference numbers (vRefNums) are not valid across boots), a directory
  135. >ID (dirID) and a file name.  With that information you can get back to those
  136. >files.
  137.  
  138. DirID aren't that great either as I found out after I had to restore
  139. a disk from a backup. :-( The dirID's all changed of course. I guess you need
  140. a full pathname AND the volname,dirid,filname triplet to really be safe.
  141. And anyone that looked into a alias can tell you that it does contain
  142. the full path name. Damn you Apple! :-) (Do what I say not as I do. For years 
  143. Apple has been bellowing: "don't use full pathnames" What did they end up 
  144. using for aliases?)
  145.  
  146.  
  147. Matt
  148. - -- 
  149. ___________________________________________________________
  150. Matthew Mora                |   my Mac  Matt_Mora@sri.com
  151. SRI International           |  my unix  mxmora@unix.sri.com
  152. ___________________________________________________________
  153.  
  154. +++++++++++++++++++++++++++
  155.  
  156. From: draper@odin.mda.uth.tmc.edu (E.J. Draper)
  157. Date: 17 Nov 1992 16:17:14 GMT
  158. Organization: U.T.M.D. Anderson Cancer Center
  159.  
  160. In article <40561@unix.SRI.COM> Matt Mora, mxmora@unix.SRI.COM writes:
  161.  
  162. >And anyone that looked into a alias can tell you that it does contain
  163. >the full path name. Damn you Apple! :-) (Do what I say not as I do. For
  164. years 
  165. >Apple has been bellowing: "don't use full pathnames" What did they end
  166. up 
  167. >using for aliases?)
  168.  
  169. So?  Why shouldn't they?  Programmatically FSSpecs are great, but are
  170. utterly useless when things breakdown or when dealing with the Alias
  171. Manager's idiosyncracies.  Say, for instance, we need to move 2.4
  172. gigabytes of patient Images from our local RAID storage system to
  173. permanent storage on our UNIX server. In the process ALL ALIASES
  174. referencing files on the RAID will be INVALIDATED but the volumes'
  175. structure will be identical. Well, what do we do now?  How does the
  176. physician's conferencing software find a patient's scan?
  177.  
  178. All we need to do is call GetAliasInfo().  From this we can obtain the
  179. full path name that was stored in the Alias handle. If Apple hadn't
  180. bothered to use and store the original path name we'd be totally out of
  181. luck!
  182.  
  183. Good Apple. Good Apple. ;-)
  184.  
  185.  
  186.       |E|J-  ED DRAPER
  187.  rEpar|D|<-  Radiologic/Pathologic Institute
  188.              The University of Texas M.D. Anderson Cancer Center
  189.              draper@odin.mda.uth.tmc.edu
  190.  
  191. +++++++++++++++++++++++++++
  192.  
  193. From: keith@taligent.com (Keith Rollin)
  194. Date: 17 Nov 92 22:13:06 GMT
  195. Organization: Taligent
  196.  
  197. In article <40561@unix.SRI.COM>, mxmora@unix.SRI.COM (Matt Mora) wrote:
  198. > And anyone that looked into a alias can tell you that it does contain
  199. > the full path name. Damn you Apple! :-) (Do what I say not as I do. For years 
  200. > Apple has been bellowing: "don't use full pathnames" What did they end up 
  201. > using for aliases?)
  202.  
  203. Well, there's a smiley in there, so I guess I don't really need to point
  204. out that Apple also writes directly to the screen, reads and sets hardware
  205. registers, examines and changes private fields of data structures, calls
  206. undocumented traps, parses up the region structure, etc...
  207.  
  208. Actually, the full pathname in the alias structure is only used as a backup
  209. in case the dirID fails. Using both a path of dirIDs and names is a very
  210. powerful technique, and I'm sure Apple wouldn't mind if you decided to
  211. implement one for your application. However, that's a lot of work, and
  212. using a dirID is very simple and works 99.9+% of the time (how often do you
  213. restore a hard disk from tape?)
  214.  
  215. - -----
  216. Keith Rollin
  217. Phantom Programmer
  218. Taligent, Inc.
  219.  
  220. +++++++++++++++++++++++++++
  221.  
  222. From: rmf@chopin.cs.columbia.edu (Robert M. Fuhrer)
  223. Organization: Computer Science Dept., Columbia Univ.
  224. Date: Tue, 17 Nov 1992 22:59:21 GMT
  225.  
  226. Of course, being able to use "relative" paths in aliases (e.g., "Up 2 folders,
  227. into the folder named 'Foo'...") would solve the problem much of the time...
  228.  
  229. Unfortunately, Apple didn't put it in (even though Unix has had this for
  230. years)!
  231. - --
  232.  
  233. - -- Bob
  234.  
  235. +++++++++++++++++++++++++++
  236.  
  237. From: ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University)
  238. Date: 18 Nov 92 17:30:31 +1300
  239. Organization: University of Waikato, Hamilton, New Zealand
  240.  
  241. In article <RMF.92Nov17175921@chopin.cs.columbia.edu>, rmf@chopin.cs.columbia.edu (Robert M. Fuhrer) writes:
  242. > Of course, being able to use "relative" paths in aliases (e.g., "Up 2 folders,
  243. > into the folder named 'Foo'...") would solve the problem much of the time...
  244. >
  245. > Unfortunately, Apple didn't put it in (even though Unix has had this for
  246. > years)!
  247.  
  248. So what does that first argument to NewAlias and ResolveAlias actually do?
  249.  
  250. Lawrence
  251. thought he was using relative aliases all this while (and had them work,
  252. too)...
  253.  
  254. +++++++++++++++++++++++++++
  255.  
  256. From: alan@uts.amdahl.com (Alan Bomberger)
  257. Date: 18 Nov 92 20:32:03 GMT
  258. Organization: Amdahl Corporation, Sunnyvale CA
  259.  
  260. "How many times do you restore a disk from tape?"
  261.  
  262. Imagine a Hypertext document with links to hundreds of files.
  263. Do you want to tell the user of a hypertext application that
  264. it will stop working should he ever have to restore his disk
  265. from tape.  Why keep a backup then?
  266.  
  267. Since you have to keep full path names one wonders why
  268. one would use DirIDs?
  269.  
  270. To answer you question.  Once is enough to have one
  271. mighty pissed off customer!!
  272.  
  273. - -- 
  274. Alan Bomberger     | (408)-992-2748  | alan@uts.amdahl.com
  275. Amdahl Corporation | Opinions are free, worth it, and not Amdahl's
  276.  
  277. +++++++++++++++++++++++++++
  278.  
  279. From: rla20@duts.ccc.amdahl.com (Roger Allen)
  280. Date: 19 Nov 92 16:59:41 GMT
  281. Organization: Amdahl Corporation, Sunnyvale CA
  282.  
  283. In article <19J603sDbc5K00@amdahl.uts.amdahl.com> alan@uts.amdahl.com (Alan Bomberger) writes:
  284. >Since you have to keep full path names one wonders why
  285. >one would use DirIDs?
  286.  
  287. This is in case the user moves the folder containing the file to another 
  288. location, the volName, dirID and fileName method will work.  
  289.  
  290. BTW, thanks to all of the people in this thread, I hadn't considered that a
  291. something could mess up the dirID and I will be putting that code in my 
  292. program...  (SC 16 didn't mention that :^) Isn't c.s.m.p great!
  293.  
  294. Thanks,
  295. Roger.
  296. - --
  297. > Roger Allen                   | Opinions expressed by me do not        <
  298. > Amdahl Computer Development   | represent the opinions of Amdahl.      <
  299. > rla20@cd.amdahl.com           |                                        <
  300.  
  301. +++++++++++++++++++++++++++
  302.  
  303. From: hardin@dino.mcc.com (John Hardin)
  304. Date: 24 Nov 92 20:36:05 GMT
  305. Organization: MCC ISD, Austin, Texas
  306.  
  307. [This is a naive question, I'm sure -- so go easy. :-)]
  308.  
  309. The consensus for storing file references seems to be storing a volume
  310. name, a directoryID, and a filename.  Given a vRefNum (e.g., as from
  311. SFPutFile), how do I get the corresponding directoryID?
  312.  
  313. - -jwh
  314. - --
  315. John W. Hardin            phone:  (512)338-3535
  316. MCC                email:  hardin@mcc.com
  317. 3500 W. Balcones Center Dr  fax:    (512)338-3897
  318. Austin, TX  78759-6509        uucp:   ...!cs.utexas.edu!milano!hardin
  319.  
  320. +++++++++++++++++++++++++++
  321.  
  322. From: absurd@apple.apple.com (Tim Dierks, software saboteur)
  323. Date: 25 Nov 92 01:56:40 GMT
  324. Organization: MacDTS Marauders
  325.  
  326. In article <HARDIN.92Nov24143605@dino.mcc.com>, hardin@dino.mcc.com (John
  327. Hardin) wrote:
  328. > [This is a naive question, I'm sure -- so go easy. :-)]
  329. > The consensus for storing file references seems to be storing a volume
  330. > name, a directoryID, and a filename.  Given a vRefNum (e.g., as from
  331. > SFPutFile), how do I get the corresponding directoryID?
  332. > -jwh
  333. > --
  334. > John W. Hardin            phone:  (512)338-3535
  335. > MCC                email:  hardin@mcc.com
  336. > 3500 W. Balcones Center Dr  fax:    (512)338-3897
  337. > Austin, TX  78759-6509        uucp:   ...!cs.utexas.edu!milano!hardin
  338.  
  339. Call GetWDInfo.  Pass it the vRefNum you got from SFPutFile and it will
  340. give you the corresponding vRefNum and dirID.  It will also give you a
  341. "procID".  You should set this to zero before calling the function,
  342. and ignore it afterwards.
  343.  
  344. In my opinion, any time you get a vRefNum (from SFGetFile, SFPutFile
  345. or GetAppFiles), you should immediately convert the vRefNum it gives you
  346. to a vRefNum / dirID pair and use those instead internally.  There are
  347. a couple of excellent reasons for this:
  348.  
  349. 1) Working directories are unstable, and avoiding them is a good thing.
  350. 2) It will make converting your program to support aliases, AppleEvents,
  351. and a lot of other stuff much easier, since these things always assume
  352. you support vRefNum/dirID pairs and that you never use working
  353. directories.
  354.  
  355. Tim Dierks
  356. MacDTS, but I speak for myself
  357.  
  358. +++++++++++++++++++++++++++
  359.  
  360. From: REEKES@applelink.apple.com (Jim Reekes)
  361. Date: 30 Nov 92 21:54:09 GMT
  362. Organization: Apple Computer, Inc.
  363.  
  364. In article <absurd-241192175158@seuss.apple.com>, absurd@apple.apple.com
  365. (Tim Dierks, software saboteur) wrote:
  366. > In article <HARDIN.92Nov24143605@dino.mcc.com>, hardin@dino.mcc.com (John
  367. > Hardin) wrote:
  368. > > 
  369. > > [This is a naive question, I'm sure -- so go easy. :-)]
  370. > > 
  371. > > The consensus for storing file references seems to be storing a volume
  372. > > name, a directoryID, and a filename.  Given a vRefNum (e.g., as from
  373. > > SFPutFile), how do I get the corresponding directoryID?
  374. > > 
  375. > > -jwh
  376. > > --
  377. > > John W. Hardin            phone:  (512)338-3535
  378. > > MCC                email:  hardin@mcc.com
  379. > > 3500 W. Balcones Center Dr  fax:    (512)338-3897
  380. > > Austin, TX  78759-6509        uucp:   ...!cs.utexas.edu!milano!hardin
  381. > Call GetWDInfo.  Pass it the vRefNum you got from SFPutFile and it will
  382. > give you the corresponding vRefNum and dirID.  It will also give you a
  383. > "procID".  You should set this to zero before calling the function,
  384. > and ignore it afterwards.
  385. > In my opinion, any time you get a vRefNum (from SFGetFile, SFPutFile
  386. > or GetAppFiles), you should immediately convert the vRefNum it gives you
  387. > to a vRefNum / dirID pair and use those instead internally.  There are
  388. > a couple of excellent reasons for this:
  389. > 1) Working directories are unstable, and avoiding them is a good thing.
  390. > 2) It will make converting your program to support aliases, AppleEvents,
  391. > and a lot of other stuff much easier, since these things always assume
  392. > you support vRefNum/dirID pairs and that you never use working
  393. > directories.
  394. > Tim Dierks
  395. > MacDTS, but I speak for myself
  396.  
  397. If you look at the Std File hacks sample code, you'll find the code
  398. we're recommending to use.
  399.  
  400. - -----------------------------------------------------------------------
  401. Jim Reekes, Polterzeitgeist  |     Macintosh Toolbox Engineering
  402.                              |          Sound Manager Expert
  403. Apple Computer, Inc.         | "All opinions expressed are mine, and do
  404. 20525 Mariani Ave. MS: 81-KS |   not necessarily represent those of my
  405. Cupertino, CA 95014          |       employer, Apple Computer Inc."
  406.  
  407. ---------------------------
  408.  
  409. From: Chuck Pliske <chuckp@u.washington.edu>
  410. Subject: Deadman programming - how to reset?
  411. Organization: University of Washington
  412. Date: Wed, 18 Nov 1992 00:35:57 GMT
  413.  
  414. I have written a "deadman" program, consisting of a faceless bg app with 
  415. a TimeManager periodic visit.  The app resets a counter every WNE, and 
  416. the TM task counts it down.  If it gets to 0, its time to reset the Mac.
  417.  
  418. It has been my observation that most crashes involve the mainline portion 
  419. of the system, and leave the interrupt system operational.  My problem is 
  420. in figuring out a reliable "reset" to use.  In my old hypercharged SE, 
  421. the "reset" instruction works just fine and I now have increased 
  422. reliability in my unattended system.  However, in the IIfx (7.1) the 
  423. reset instruction blanks the screen but does not otherwise reset the 
  424. computer.  Any suggestions would be appreciated.
  425.  
  426. Chuck Pliske
  427.  
  428. +++++++++++++++++++++++++++
  429.  
  430. From: David_B._Lamkins@fourd.com
  431. Organization: 4th Dimension BBS
  432. Date: Wed, 18 Nov 1992 11:19:29 EST
  433.  
  434. Chuck Pliske wrote:
  435.  
  436. > In my old hypercharged SE, 
  437. > the "reset" instruction works just fine and I now have increased 
  438. > reliability in my unattended system.  However, in the IIfx (7.1) the 
  439. > reset instruction blanks the screen but does not otherwise reset the 
  440. > computer.  Any suggestions would be appreciated.
  441.  
  442. Take a look at the ShutdownManager in IM V, pg. 585. You'd call the _Shutdown
  443. trap with a sdRestart selector (=2) passed on the stack as an integer.
  444.  
  445. Dave
  446. ********************************************************************
  447. System: fourd.com                                Phone: 617-494-0565
  448. Cute quote:  Being a computer means never having to say you're sorry
  449. ********************************************************************
  450.  
  451.  
  452. +++++++++++++++++++++++++++
  453.  
  454. From: chuckp@u.washington.edu (Chuck Pliske)
  455. Date: 2 Dec 92 09:48:27 GMT
  456. Organization: University of Washington
  457.  
  458. Re: Deadman programming - how to reset?
  459.  
  460. Dave, the "coordinated" shutdown I need to avoid, because I need to 
  461. restart *after* the mainline has "crashed", i.e. we can't quit running 
  462. jobs, etc.  I ended up using a TM task to count down a global, resetting 
  463. it with a mainline "faceless" task, and using the TM task to branch to 
  464. Rombase+10 to do the actual reset.  It works pretty well, since most of 
  465. my crashes seem to be in the mainline.
  466.  
  467. Chuck
  468.  
  469. ---------------------------
  470.  
  471. From: tcd@vax5.cit.cornell.edu
  472. Subject: calling MacTCP from ioCompletion routine
  473. Date: 29 Nov 92 19:58:29 EST
  474. Organization: Cornell University
  475.  
  476.      I am wondering whether it is safe to make MacTCP calls from the
  477. interrupt level.  In particular, I am doing asynchronous UDPReads and
  478. would like my ioCompletion routine to return the buffer and queue 
  479. another read after processing an incoming packet.  Might I also be  
  480. able to do a UDPWrite at that time if the need should later arise?
  481. IM II says that PBControl may move memory; the only clue I could find
  482. in the MacTCP Programmer's Guide was the statement that "you are
  483. not allowed to make further synchronous MacTCP calls from an ASR."
  484. Anybody know the answer?  Thanks
  485. Tim Dorcey
  486.  
  487. +++++++++++++++++++++++++++
  488.  
  489. From: hanord@rubin.dbe (Haavard Nord)
  490. Date: 1 Dec 92 18:47:32 GMT
  491. Organization: Department of Biomedical Engineering
  492.  
  493. It should be safe to call MacTCP from a (PPC) ioCompletion routine.
  494. I call Sybase OpenClient, which in order calls MacTCP. This works fine,
  495. although I have problems with loading the Sybase segments.
  496. - -hanord
  497. - --
  498. ===============================================================================
  499.  Haavard Nord                                        email: hanord@ibt.unit.no
  500.  Dept. of Biomedical Engineering                     phone: +47 7 598685
  501.  Trondheim, Norway                                     fax: +47 7 598613
  502. ===============================================================================
  503.  
  504. +++++++++++++++++++++++++++
  505.  
  506. From: davidp@calvin.usc.edu (David Peterson)
  507. Date: 1 Dec 92 07:29:22 GMT
  508. Organization: University of Southern California, Los Angeles, CA
  509.  
  510.  
  511. In article <1992Nov29.195829.16197@vax5.cit.cornell.edu>, tcd@vax5.cit.cornell.edu writes:
  512. |>      I am wondering whether it is safe to make MacTCP calls from the
  513. |> interrupt level.  In particular, I am doing asynchronous UDPReads and
  514. |> would like my ioCompletion routine to return the buffer and queue 
  515. |> another read after processing an incoming packet.  Might I also be  
  516. |> able to do a UDPWrite at that time if the need should later arise?
  517. |> IM II says that PBControl may move memory; the only clue I could find
  518. |> in the MacTCP Programmer's Guide was the statement that "you are
  519. |> not allowed to make further synchronous MacTCP calls from an ASR."
  520. |> Anybody know the answer?  Thanks
  521. |> Tim Dorcey
  522.  
  523.  
  524. As long as the calls you are making are asyncronous.
  525.  
  526. Chaining completion procs together like this works great in MacTCP. Just have
  527. your recieve completion proc do an asyncronous buffer return and another
  528. asyncronous recieve and your app is continuously receiving data without even
  529. knowing about it.
  530.  
  531. Another thing to try is have the recieve completion proc do an asyncronous
  532. PBWrite and have _its_ completion proc do another asyncronous UDBReceive.
  533. Its a bit hairy at first, and you can vomit enormous amounts of garbage to
  534. your disk before you get it debugged, but afterwards it works great.
  535.  
  536. - -dave.
  537.  
  538. ---------------------------
  539.  
  540. From: nedervol@schaefer.math.wisc.edu (Eric Nedervold)
  541. Subject: How can you discover which debugger is installed?
  542. Date: 30 Nov 92 17:40:48 GMT
  543. Organization: Univ. of Wisconsin Dept. of Mathematics
  544.  
  545. Is there any way to find out within a program which debugger is installed?
  546. I'd like to format my debug strings differently if I'm running with
  547. MacsBug than if I've got the ThinkC debugger.  Is the name secreted away
  548. anywhere like AppName[] is?
  549.  
  550. - --Eric
  551.  
  552. +++++++++++++++++++++++++++
  553.  
  554. From: cole@alexia.lis.uiuc.edu (Sandra Stewart-Cole)
  555. Date: 2 Dec 92 08:41:57 GMT
  556. Organization: University of Illinois at Urbana
  557.  
  558. In <1992Nov30.174048.774@schaefer.math.wisc.edu> 
  559. nedervol@schaefer.math.wisc.edu (Eric Nedervold) writes:
  560.  
  561. >Is there any way to find out within a program which debugger is installed?
  562. >I'd like to format my debug strings differently if I'm running with
  563. >MacsBug than if I've got the ThinkC debugger.  Is the name secreted away
  564. >anywhere like AppName[] is?
  565.  
  566. Well, there is no global that does the pure job, however there are possible 
  567. ways to tell. For instance, if the Think C Debugger is present, it will show up
  568. as a regular application if you run thru them all with process manager calls.
  569. Not ideal, but if you do it once at the start and set a global it isn't too 
  570. painful. Alternatively, you can try checking where the debugger traps 
  571. (_Debugger and _DebugStr) are dispatched to, and that can clue you to who is 
  572. answering the calls. If you just want to check for the presence of MacsBug, 
  573. you should also be able to check the interrupt dispatch table for where a 
  574. level 7 interrupt goes. If it is outside RAM, MacsBug isn't about.
  575.   
  576.  
  577. ---------------------------
  578.  
  579. From: rson@rhi.hi.is (Mimir Reynisson)
  580. Subject: AppleEvents for Print server 3.0?
  581. Date: 3 Dec 92 10:39:48 GMT
  582.  
  583. The title says it all. Does the AppleShare Print server support
  584. apple events and if so which apple events? I'm particularily interested
  585. in the printer queue can I get a copy of the queue via apple events?
  586.  
  587. Thanks in advance.
  588.  
  589. +++++++++++++++++++++++++++
  590.  
  591. From: apple.com (Ben Beasley)
  592. Date: Thu, 3 Dec 1992 16:19:55 GMT
  593. Organization: Apple
  594.  
  595. The PrintSpooler doesn't support AppleEvents. It doesn't have the bit set in the size 
  596. resource for accepting High-Level events and when I ran a  (PPC)browser tool 
  597. that application doesn't show up in the "Programs" field.
  598.  
  599. This has been a request made by developers before for the PrintSpooler, just 
  600. thought you should know that your inquary has NOT fallen on deaf-ears.
  601. Regards,
  602.  
  603. Benjamin Beasley
  604.  
  605.  
  606. In article <5684@krafla.rhi.hi.is>, rson@rhi.hi.is (Mimir Reynisson) writes:
  607. > The title says it all. Does the AppleShare Print server support
  608. > apple events and if so which apple events? I'm particularily interested
  609. > in the printer queue can I get a copy of the queue via apple events?
  610. > Thanks in advance.
  611.  
  612. ---------------------------
  613.  
  614. Subject: Fixing Apples serial drivers. How???
  615. From: chergr@lure.latrobe.edu.au
  616. Date: Tue, 3 Nov 1992 01:30:52 GMT
  617. Organization: VAX Cluster, Computer Centre, La Trobe University 
  618.  
  619. Does any one have inner knowledge of the Apple serial drivers?
  620.  
  621. I have written a terminal emulation program based on CommControl
  622. from Faceware, which in turn is based on the CommsToolbox.
  623. This was done because I was using terminal emulators such
  624. as Versaterm Pro (slow) and others to download FORTH source
  625. code to a microcomputer with a FORTH compiler in EPROM. 
  626. The Baud rate is either 9600 or 38400. The large amount
  627. of text transfered along with pauses during compilation
  628. requires that the Mac responds properly to handshaking.
  629.  
  630. In fact indications are that the Mac sometimes ignores
  631. or misses Xoff or even hardware handshaking so overflowing
  632. the input buffer on the micro. 
  633.  
  634. Writing my own terminal emulator was supposed to solve the
  635. problem but it does not. Hence the problem is likely to be
  636. in Apples low level drivers. 
  637.  
  638. Can these drivers be tuned to work better or can they be fixed.
  639. I have written low level drivers for the SCC chip before but
  640. I am reluctant to do this because of possible conflicts with
  641. other interrupt driven hardware in the system such as the
  642. floppy disk drivers.
  643.  
  644. Thanks in advance Richard Rothwell
  645.  
  646. P.S. This problem occurs on both a Mac Plus a Mac II and IIfx.
  647.  
  648. +++++++++++++++++++++++++++
  649.  
  650. From: oster@well.sf.ca.us (David Phillip Oster)
  651. Date: 3 Nov 92 09:20:23 GMT
  652. Organization: Whole Earth 'Lectronic Link
  653.  
  654. I don;t know what the original poster was doing wrong, but Apple's serial
  655. drivers certainly do correctly implement handshaking. Anytime anyone prints
  656. on a serial imagewriter, the handshaking does its stuff. Works fine.
  657.  
  658. +++++++++++++++++++++++++++
  659.  
  660. From: Alexander M. Rosenberg <alexr@apple.com>
  661. Date: Tue, 3 Nov 1992 19:21:05 GMT
  662. Organization: Hackers Anonymous
  663.  
  664. In article <1992Nov3.113052.1@lure.latrobe.edu.au> ,
  665. chergr@lure.latrobe.edu.au writes:
  666. >which in turn is based on the CommsToolbox.
  667.  
  668. Why is it that so many people get this wrong. It's CommToolbox. I've
  669. noticed that generally persons from Australia and England add the 's'
  670. while most USA people use 'Comm ToolBox', which is also wrong.
  671.  
  672. I guess this is why Byron gave up on correcting people.
  673.  
  674. (There's only so much us "spelling Nazis" can take.)
  675. - ---------------------------------------------------------------------------
  676. - -  Alexander M. Rosenberg  - INTERNET: alexr@apple.com      - Yoyodyne    -
  677. - -  330 Waverley St., Apt B - UUCP:ucbvax!apple!alexr        - Propulsion  -
  678. - -  Palo Alto, CA 94301     -                                - Systems     -
  679. - -  (415) 329-8463          - Nobody is my employer so       - :-)         -
  680. - -  (408) 974-3110          - nobody cares what I say.       -             -
  681.  
  682. +++++++++++++++++++++++++++
  683.  
  684. From: jimc@tau-ceti.isc-br.com (Jim Cathey)
  685. Date: 3 Nov 92 21:57:11 GMT
  686. Organization: ISC - Bunker Ramo, Spokane, WA
  687.  
  688. In article <1992Nov3.113052.1@lure.latrobe.edu.au> chergr@lure.latrobe.edu.au writes:
  689. >In fact indications are that the Mac sometimes ignores
  690. >or misses Xoff or even hardware handshaking so overflowing
  691. >the input buffer on the micro. 
  692.  
  693. I doubt this.  However, a common characteristic of nearly _all_
  694. current handshaking schemes on serial ports is that up to several
  695. more characters may be sent after flow control is tripped.  That is,
  696. ports aren't guaranteed to shut off at exactly the next character, one
  697. or more may dribble out first.
  698.  
  699. Now, if your device is particularly dumb (like a TTY 40, for example),
  700. it is unable to accept _any_ further characters after it has triggered
  701. the flow control, and any dribble out the port will be lost.  This is
  702. bad.  For the TTY 40, we had to make a polling driver (non-Mac, btw)
  703. that polled for SR empty before checking flow control and then putting
  704. another character into the SR of the serial controller.  This is nasty. 
  705.  
  706. So, how dumb is your device? If it's a bit-banging microcontroller, or
  707. one that's not interrupt-driven and/or has no FIFO, it's easily possible
  708. that it's unable to see the line for short periods, and could miss
  709. characters.  Not the Mac's fault, though.  Any current system would
  710. probably act the same. 
  711.  
  712. - -- 
  713. +----------------+
  714. ! II      CCCCCC !  Jim Cathey
  715. ! II  SSSSCC     !  ISC-Bunker Ramo
  716. ! II      CC     !  TAF-C8;  Spokane, WA  99220
  717. ! IISSSS  CC     !  UUCP: uunet!isc-br!jimc (jimc@isc-br.isc-br.com)
  718. ! II      CCCCCC !  (509) 927-5757
  719. +----------------+
  720.             "PC's --- the junk bonds of the computer industry"
  721.  
  722. +++++++++++++++++++++++++++
  723.  
  724. From: alen@crash.cts.com (Alen Shapiro)
  725. Date: 3 Nov 92 20:38:09 GMT
  726. Organization: CTS Network Services (crash, ctsnet), El Cajon, CA
  727.  
  728. In <Bx4vA0.Gw2@well.sf.ca.us> oster@well.sf.ca.us (David Phillip Oster) writes:
  729.  
  730. >I don;t know what the original poster was doing wrong, but Apple's serial
  731. >drivers certainly do correctly implement handshaking. Anytime anyone prints
  732. >on a serial imagewriter, the handshaking does its stuff. Works fine.
  733.  
  734. My experience has been that with System 7.01, serial io will lose
  735. incomming characters while appletalk is active (I've only tested
  736. this with baud rates 9600 or greater...don't know the lower bound).
  737.  
  738. I have not tried any tests with my recently installed 7.1. This does NOT
  739. seem to be a buffer overflow problem, rather a "lost interrupt"/character
  740. overrun problem.
  741.  
  742. Anyone have any experience with 7.1 and serial io with appletalk talking?
  743.  
  744. - --alen
  745. alen@crash.cts.com
  746.  
  747. ps I have noticed that hardware handshaking is much more severe with 7.1
  748.    i.e. a background serial transfer program stays inactive for longer
  749.    than with 7.01...subjective only...sorry (perhaps this is a MF scheduling
  750.    change?)
  751.  
  752. +++++++++++++++++++++++++++
  753.  
  754. From: jon3@quads.uchicago.edu (Jason Jones)
  755. Date: 4 Nov 92 15:39:03 GMT
  756. Organization: University of Chicago Computing Organizations
  757.  
  758. In article <alen.720823089@crash.cts.com> alen@crash.cts.com (Alen Shapiro) writes:
  759. >My experience has been that with System 7.01, serial io will lose
  760. >incomming characters while appletalk is active (I've only tested
  761. >this with baud rates 9600 or greater...don't know the lower bound).
  762.  
  763. In writing a net/modem game last year, I noticed that the serial drivers
  764. would sometimes lose characters while I was playing asynchronous sounds.
  765. This only happened at baud rates of 2400 and higher on the older, 68000
  766. models (and probably has a lot to do with different sound hardware).
  767.  
  768. The problem was a hardware overflow of the SCC's internal 3-byte buffer,
  769. if I remember right.
  770.  
  771. Jason.
  772.  
  773. +++++++++++++++++++++++++++
  774.  
  775. From: warren@laplace.biology.yale.edu (Warren DeLano)
  776. Organization: Yale University, Department of Computer Science, New Haven, CT
  777. Date: Tue, 17 Nov 1992 16:19:10 GMT
  778.  
  779. In article <alen.720823089@crash.cts.com> alen@crash.cts.com (Alen Shapiro)  
  780. writes:
  781. > In <Bx4vA0.Gw2@well.sf.ca.us> oster@well.sf.ca.us (David Phillip Oster)  
  782. writes:
  783. > >I don;t know what the original poster was doing wrong, but Apple's serial
  784. > >drivers certainly do correctly implement handshaking. Anytime anyone prints
  785. > >on a serial imagewriter, the handshaking does its stuff. Works fine.
  786. > My experience has been that with System 7.01, serial io will lose
  787. > incomming characters while appletalk is active (I've only tested
  788. > this with baud rates 9600 or greater...don't know the lower bound).
  789. > I have not tried any tests with my recently installed 7.1. This does NOT
  790. > seem to be a buffer overflow problem, rather a "lost interrupt"/character
  791. > overrun problem.
  792. > Anyone have any experience with 7.1 and serial io with appletalk talking?
  793. I've noticed the same problem with appletalk and hardware handshaking under  
  794. System 7 and 7.1.  Although appletalk is not the exclusive cause of the  
  795. problem, downloads tend to have many more retries if I am connected to a busy  
  796. network.  This problem only occurs for me only on downloading and not  
  797. uploading.
  798.  
  799. > From: oster@well.sf.ca.us (David Phillip Oster)
  800. > I don;t know what the original poster was doing wrong, but Apple's serial
  801. > drivers certainly do correctly implement handshaking. Anytime anyone prints
  802. > on a serial imagewriter, the handshaking does its stuff. Works fine.
  803. > This would correlate with the post which said that --
  804.  
  805. Printing to an imagewriter involves sending large amounts of data but not  
  806. receiving.  Consequently, only transmit hardware handshaking is used during  
  807. printing.  The problems I have seem to involve only receive hardware  
  808. handshaking.
  809.  
  810. Anyone else encountered these symptoms?
  811.  
  812. ========================================================
  813. Warren Lyford DeLano  -  warren@laplace.biology.yale.edu 
  814. Box 5061, New Haven, CT 06520 AOL:Warren CIS: 72746,1363
  815. ========================================================
  816.  
  817. +++++++++++++++++++++++++++
  818.  
  819. From: russotto@eng.umd.edu (Matthew T. Russotto)
  820. Date: Tue, 17 Nov 92 23:29:18 GMT
  821. Organization: Project GLUE, University of Maryland, College Park
  822.  
  823.  
  824. The problem is quite real, and not System 7 specific.  Appletalk
  825. disables interrupts while it gets the packets, and doesn't service the
  826. modem port in the copious free time it has (if a Mac 512 has no free
  827. time to do it, a Q700 ought to have plenty--HEY APPLE!!!!!!! FIX IT!)
  828.  
  829. So, if during the time Appletalk is getting the packets, more than 3
  830. characters come in on the modem port.... whammo, hardware overrun.
  831. - -- 
  832. Matthew T. Russotto    russotto@eng.umd.edu    russotto@wam.umd.edu
  833. Some news readers expect "Disclaimer:" here.
  834. Just say NO to police searches and seizures.  Make them use force.
  835. (not responsible for bodily harm resulting from following above advice)
  836.  
  837. +++++++++++++++++++++++++++
  838.  
  839. From: paul@taniwha.UUCP (Paul Campbell)
  840. Date: 30 Nov 92 16:02:32 GMT
  841. Organization: Taniwha Systems Design
  842.  
  843. In article <1992Nov17.232918.9155@eng.umd.edu> russotto@eng.umd.edu (Matthew T. Russotto) writes:
  844.  
  845. >The problem is quite real, and not System 7 specific.  Appletalk
  846. >disables interrupts while it gets the packets, and doesn't service the
  847. >modem port in the copious free time it has (if a Mac 512 has no free
  848. >time to do it, a Q700 ought to have plenty--HEY APPLE!!!!!!! FIX IT!)
  849.  
  850. The Q700/900/950/FX of course have LESS free time than a Mac 512 because they
  851. use an IOP to talk to the SCC. This is sort of like using an Apple II to 
  852. do your LocalTalk and modem access.
  853.  
  854.     Paul
  855.  
  856. - -- 
  857. Paul Campbell    UUCP: ..!mtxinu!taniwha!paul     AppleLink: CAMPBELL.P
  858. Use up your Quayle jokes now while they're still good "Quayle for Pres. in '94"
  859.      Q: Why is Marilyn Quayle like Marion Barry?
  860.      A: They both suck a little dope.
  861.  
  862. +++++++++++++++++++++++++++
  863.  
  864. Organization: Royal Institute of Technology, Stockholm, Sweden
  865. Date: Tue, 1 Dec 1992 12:47:05 GMT
  866.  
  867. In <1314@taniwha.UUCP> paul@taniwha.UUCP (Paul Campbell) writes:
  868.  
  869. >>The problem is quite real, and not System 7 specific.  Appletalk
  870. >>disables interrupts while it gets the packets, and doesn't service the
  871. >>modem port in the copious free time it has (if a Mac 512 has no free
  872. >>time to do it, a Q700 ought to have plenty--HEY APPLE!!!!!!! FIX IT!)
  873.  
  874. >The Q700/900/950/FX of course have LESS free time than a Mac 512 because they
  875. >use an IOP to talk to the SCC. This is sort of like using an Apple II to 
  876. >do your LocalTalk and modem access.
  877.  
  878. The Q700 only uses the 68040.
  879.  
  880. t have to be slowed down by LocalTalk
  881. t) when the IOPs are ON, but several applications
  882. I like to run (Like, CuBase and Sound Designer and the venerable
  883. SoundEdit) do NOT like the IOP :-(
  884.  
  885. Cheers,
  886.  
  887.                         / h+
  888.  
  889. - -- 
  890.  -- Jon W{tte, h+@nada.kth.se, Mac Hacker Deluxe --
  891.   "It was, in fact, cool as all get-out.  Fortunately it was a little
  892.    too late (historically speaking) to be groovy."
  893.                      -- Dennis Pelton
  894.  
  895. +++++++++++++++++++++++++++
  896.  
  897. From: philip@research.canon.oz.au (Philip Craig)
  898. Organization: Canon Information Systems Research Australia
  899. Date: Thu, 3 Dec 1992 00:36:34 GMT
  900.  
  901. tte) writes:
  902.  
  903. >In <1314@taniwha.UUCP> paul@taniwha.UUCP (Paul Campbell) writes:
  904.  
  905. >>>The problem is quite real, and not System 7 specific.  Appletalk
  906. >>>disables interrupts while it gets the packets, and doesn't service the
  907. >>>modem port in the copious free time it has (if a Mac 512 has no free
  908. >>>time to do it, a Q700 ought to have plenty--HEY APPLE!!!!!!! FIX IT!)
  909.  
  910. >>The Q700/900/950/FX of course have LESS free time than a Mac 512 because they
  911. >>use an IOP to talk to the SCC. This is sort of like using an Apple II to 
  912. >>do your LocalTalk and modem access.
  913.  
  914. >The Q700 only uses the 68040.
  915.  
  916. t have to be slowed down by LocalTalk
  917. t) when the IOPs are ON, but several applications
  918. >I like to run (Like, CuBase and Sound Designer and the venerable
  919. >SoundEdit) do NOT like the IOP :-(
  920.  
  921. Maybe that's because the IOP gives errors. Seriously.
  922.  
  923. I wrote some high speed serial testing code (just using the normal RAM
  924. Serial driver -- no stuffing around with the Z8530 SCC chip or anything).
  925.  
  926. It *always* got lots of spurious errors on a IIfx with the IOP turned on.
  927. Switching the Serial Control switch to Compatible fixed these errors.
  928. The IOP has never been a reliable high-speed serial solution. A shame.
  929. - -- 
  930.    _/_/_/ _/  _/ _/ _/     _/ _/_/_/ _p_h_i_l_i_p_@_r_e_s_e_a_r_c_h_._c_a_n_o_n_._o_z_._a_u   _--_|\
  931.   _/  _/ _/  _/ _/ _/     _/ _/  _/  Phone: +61 2 805 2951        /      \
  932.  _/_/_/ _/_/_/ _/ _/     _/ _/_/_/   Fax:   +61 2 805 2929        \_.--._/
  933. _/     _/  _/ _/ _/_/_/ _/ _/     PO Box 313 North Ryde 2113 AUSTRALIA  v
  934.  
  935. ---------------------------
  936.  
  937. End of C.S.M.P. Digest
  938. **********************
  939.